<template>
  <div class="processTest">
    <el-card shadow="never">
      <ul class="mui-table-view">
        <li class="mui-table-view-cell">
          工单编号
          <span style="color: red;">*</span>
          <span class="content">WN20190801007</span>
        </li>
        <li class="mui-table-view-cell">
          检验日期
          <span style="color: red;">*</span>
          <span class="content">2019/8/5</span>
        </li>
        <li class="mui-table-view-cell">
          检验人员
          <span style="color: red;">*</span>
          <span class="content">管理员</span>
        </li>
        <li class="mui-table-view-cell">
          产品名称
          <span style="color: red;">*</span>
          <span class="content">测试002</span>
        </li>
        <li class="mui-table-view-cell">
          检验总数
          <span style="color: red;">*</span>
          <span class="content">250</span>
        </li>
        <li class="mui-table-view-cell">
          不良数量
          <span style="color: red;">*</span>
          <span class="content"></span>
        </li>
        <li class="mui-table-view-cell" @click="dialogVisible1=true">
          <a class="mui-navigate-right">
            不良代码
            <span class="choice">{{ label2 }}</span>
          </a>
        </li>
        <li class="mui-table-view-cell" @click="dialogVisible=true">
          <a class="mui-navigate-right">
            总&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;评
            <span class="choice">{{ label }}</span>
          </a>
        </li>
        <li class="mui-table-view-cell">
          不&nbsp;良&nbsp;率
          <span class="content"></span>
        </li>
      </ul>
      <textarea cols="10" rows="2" placeholder="登记备注"></textarea>
       <div class="btn">
      <mt-button size="large" type="primary">提交</mt-button>
      <mt-button size="large" type="default" @click="goBack">返回</mt-button>
    </div>
    </el-card>
 <el-dialog :visible.sync="dialogVisible1" width="90%">
      <mt-radio @change="check1" align="right" v-model="value2" :options="options1"></mt-radio>
    </el-dialog>
   
    <el-dialog :visible.sync="dialogVisible" width="90%">
      <mt-radio @change="check" align="right" v-model="value" :options="options"></mt-radio>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      dialogVisible1:false,
      dialogVisible: false,
      label: "合格",
      value: "",
      label2: "==请选择==",
      value2: "",
      options: [{ label: "合格", value: "1" }, { label: "不合格", value: "2" }],
     options1:[
        {label:'==请选择==',value:'0'},
        {label:'A001',value:'1'},
        {label:'A002',value:'2'},
        {label:'A003',value:'3'},
        {label:'A004',value:'4'},
        {label:'A005',value:'5'},
        {label:'A006',value:'6'}
      ]
    };
  },
  methods: {
    goDealPerson() {
      this.$router.push({ name: "dealPerson" });
    },
    goBack() {
      this.$router.go(-1);
    },
    check() {
      if (this.value === "1") {
        this.label = "合格";
      } else {
        this.label = "不合格";
      }

      this.dialogVisible = false;
    },
     check1(){
      this.dialogVisible1 = false
      if(this.value2 === '0'){
        this.label2 = '==请选择=='
      }else if(this.value2 === '1'){
        this.label2 = 'A001'
      }else if(this.value2 === '2'){
        this.label2 = 'A002'
      }else if(this.value2 === '3'){
        this.label2 = 'A003'
      }else if(this.value2 === '4'){
        this.label2 = 'A004'
      }else if(this.value2 === '5'){
        this.label2 = 'A005'
      }else if(this.value2 === '6'){
        this.label2 = 'A006'
      }
    }
  }
};
</script>

<style scoped="scoped">
.mui-table-view-cell > a:not(.mui-btn) {
  font-size: 16px;
}
.mint-button--large {
  margin-top: 10px;
}
.btn {
  margin: 0 10px;
}
.content {
  margin-left: 50px;
  color: #797575;
  font-size: 16px;
}
textarea {
  border: none;
}
.processTest .el-card__body {
  margin-left: 5px;
}
.choice {
  margin-left: 62px;
  color: #797575;
  font-size: 16px;
}
</style>
